fix(ci): keep sample load smoke tests offline-safe#6344
Open
Sehlani042 wants to merge 2 commits into
Open
Conversation
Collaborator
|
Hi @Sehlani042 , Thank you for your contribution! We appreciate you taking the time to submit this pull request. Your PR has been received by the team and is currently under review. We will provide feedback as soon as we have an update to share. |
Collaborator
|
Hi @wyf7107 , can you please review this. LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/unittests/test_samples.pyWhy
Recent CI runs on existing PRs hit two unrelated main-branch failures:
tests/unittests/test_samples.py::test_sample_loads[...]failed for Cloud samples because offline CI has no ADC.mypyreported newFinishReason | Noneerrors at the LiteLLM streaming finalizers when passingmapped_finish_reasoninto_finish_reason_to_error_message.This keeps the new sample load smoke test hermetic while preserving coverage for samples that can construct their root agents offline.
Verification
RED before fix:
uv run pytest tests/unittests/test_samples.py::test_sample_loads --tb=short -q -xfailed ona2a/a2a_auth/remote_a2a/bigquery_agentwithDefaultCredentialsError.uv run mypy src/google/adk/models/lite_llm.pyreported the targeted_finish_reason_to_error_messageFinishReason | Noneerrors.GREEN after fix:
uv run pytest tests/unittests/test_samples.py::test_sample_loads --tb=short -q->149 passed, 30 skipped, 3 xfailed, 1 xpasseduv run pytest tests/unittests/models/test_litellm.py -q->317 passed, 1 skippeduv run ruff check src/google/adk/models/lite_llm.py tests/unittests/test_samples.py-> passeduv run pyink --check src/google/adk/models/lite_llm.py tests/unittests/test_samples.py-> passedgit diff --check-> passeduv run mypy .still reports the existing baseline errors, but the_finish_reason_to_error_messageregression is gone from the full output.